The present invention relates to a debug device and a debug method for converting a parallel program to a serial program and executing debugging. The present invention also relates to a storage medium for storing a program that implements such debug method.
Herein, programs written in parallel programming languages are referred to as parallel programs.
Also, programs written in the programming languages for describing serial processing are referred to as serial programs.
Further, debugging signifies identifying and correcting bugs of a program.
Parallel programming languages are generally used for describing the processing to execute some tasks concurrently in parallel. For example, for design of a Large-Scale Integrated (LSI) circuit, a parallel programming language is used as a programming language rather than a serial processing because the internal operation of the LSI is basically parallel. Essentially, in order to verify the operation of the LSI designed by the parallel programming language, it is preferable to run the parallel program describing the LSI operation on a computer.
However, most computers used by LSI designers for LSI designing are built for executing serial programs. With use of such computers that execute the serial programs, it is not possible to directly execute parallel programs.
Accordingly, as shown in FIG. 1, widely adopted is a method in which a parallel program 1 is automatically converted to a serial program 4 by a serialization unit 2 and the obtained serial program 4 is executed on the computer. If a bug (failure) is found out in the original parallel program 1 as a result of executing the serial program 4, a designer runs the serial program 4 on a debugger 6 to specify the location of the bug, and then corrects the corresponding location in the original parallel program 1.
When the parallel program 1 is automatically converted to the serial program 4 by the serialization unit 2, a singularity of line in the parallel program 1 is sometimes converted to a plurality of lines of processing in the serial program 4. Also, a variable identifier in the parallel program 1 is sometimes converted to a different variable identifier in the serial program 4.
In the aforementioned method, when the parallel program 1 is converted to the serial program 4, no information is left as for which line in the serial program 4 a certain line in the parallel program 1 is converted to, or which variable identifier in the serial program 4 a certain variable identifier in the parallel program 1 is converted to.
Consequently, an operator who performs debugging needs to proceed with the operation while obtaining the correspondence between the lines in the parallel program 1 and the lines in serial program 4 by him/herself. Further, the operator also needs to proceed with the operation while obtaining the correspondence between the variable identifiers in the parallel program and the variable identifiers in the serial program by him/herself. As a result, the operation of converting the parallel program to the serial program and executing debugging suffers considerable deterioration of efficiency and takes long time.
Further, as shown in FIG. 2, there is known a method in which a parallel program 1 is once converted to a serial program 4 for correction. Specifically, if a bug is found in the serial program 4, not the original parallel program 1 but the serial program 4 is corrected. Then, the corrected serial program is converted to a parallel program 10 by a parallelization unit 9 (see Japanese Patent Laid-Open Publication HEI 8-16429 as an example). Still in this method, however, an operator needs to debug the serial program 4 containing lines and variable identifiers different from those in the parallel program 1. This deteriorates the efficiency of the debug operation. Furthermore, according to this method, the serial program 4 is converted to the parallel program 10 after being debugged, so that the configuration of the obtained parallel program 10 is possibly changed contrary to the intention of a creator of the original parallel program 1. As a result, the program becomes less concise, and the working efficiency is reduced in later use or change of the parallel program 10.